int main(){
  int n;
  int flag;
  for (n = 100; n <= 999; n++){
    flag = 0;
    int a, b, c;
    int m = n;
    c = m % 10;
    m /= 10;
    b = m % 10;
    m /= 10;
    a = m % 10;
    if (a *a * a + b * b * b + c * c * c == n)
      flag = 1;
    if (flag)
      printf("%d\n", n);
  }
}
